<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="Generator" content="EditPlus®">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<title>json数组的创建复制取值</title>
	</head>

	<body>
		<script src="js/jquery.min.js"></script>
		<script>
			$(function(){
//				var jsonArr = [{'test':'test1','qty':'1111'},{'test':'test2','qty':'2222'}];
				var codes = ["code1","code2","code3"];
				var value = ["1111","2222","3333"];
				var jsonArr = [];
				for(var j=0;j<codes.length;j++){
					var arr = {
						"code":codes[j],
						"value":value[j]
					}
					jsonArr.push(arr);
				}
				for (var i=0;i<jsonArr.length;i++) {
					alert(jsonArr[i]["code"]+"======"+jsonArr[i]["value"])
				}

			});
		</script>
	</body>
	
</html>